Skip to content

ci: update Claude review workflows to Opus 4.6#73

Merged
ian-flores merged 3 commits intomainfrom
update-claude-opus-4-6
Feb 10, 2026
Merged

ci: update Claude review workflows to Opus 4.6#73
ian-flores merged 3 commits intomainfrom
update-claude-opus-4-6

Conversation

@ian-flores
Copy link
Contributor

Summary

  • Update model ID in claude-auto-review.yml from us.anthropic.claude-opus-4-5-20251101-v1:0 to us.anthropic.claude-opus-4-6-v1
  • Add claude.yml PR assistant workflow (responds to @claude mentions in PRs/issues)

Test plan

  • Verify auto-review triggers on next PR opened
  • Verify @claude mentions work in PR comments

@ian-flores ian-flores changed the title Update Claude review workflows to Opus 4.6 ci: update Claude review workflows to Opus 4.6 Feb 6, 2026
@ian-flores ian-flores requested a review from statik February 6, 2026 20:10
@ian-flores ian-flores marked this pull request as ready for review February 6, 2026 20:10
Copy link
Collaborator

@statik statik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! requesting some additional security

jobs:
claude-code-action:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you extend the guards on this to only allow being invoked by maintainers or org members? this is a copy paste answer from google when I searched how to limit this

jobs:
  comment-job:
    if: github.actor == 'repo-maintainer' || contains(github.event.issue.author_association, 'COLLABORATOR')
    runs-on: ubuntu-latest
    steps:
      - run: echo "Only maintained by authorized users"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added author_association checks to each event path in the if condition. Only OWNER, MEMBER, and COLLABORATOR can now trigger the workflow — external contributors and first-time commenters are silently ignored. Used the fromJSON + contains pattern to check against the allowed list.

@ian-flores ian-flores requested a review from statik February 9, 2026 23:47
@statik
Copy link
Collaborator

statik commented Feb 9, 2026

@ian-flores I love the author_association approach. I noticed https://github.blog/changelog/2025-08-08-upcoming-changes-to-github-events-api-payloads/ says the author association was being removed from issue comment and pr comment payloads last year. I wonder if there is another way to get this info?

Copy link
Collaborator

@statik statik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets test it out!

author_association may be removed from GitHub event payloads.
Use the repo collaborators permission API instead to verify
the actor has write or admin access before running.
@ian-flores
Copy link
Contributor Author

Replaced author_association with a repo permission API check. The workflow now calls GET /repos/{owner}/{repo}/collaborators/{actor}/permission as the first step and fails if the actor doesn't have write or admin access. This avoids relying on author_association in the event payload entirely — good catch on the deprecation risk.

@ian-flores ian-flores merged commit 0fbe1ad into main Feb 10, 2026
3 checks passed
@ian-flores ian-flores deleted the update-claude-opus-4-6 branch February 10, 2026 16:21
@ian-flores
Copy link
Contributor Author

It worked @statik! Thanks for the reviews 🤝

https://github.com/posit-dev/team-operator/actions/runs/21873081709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants